package com.fowo.api.sys.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fowo.api.common.model.R;
import com.fowo.api.sys.entity.SysLog;
import com.fowo.api.sys.model.SysLogSearch;
import com.fowo.api.sys.service.SysLogService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Tag(name = "系统日志")
@RequestMapping("/api/sys/log")
@RestController
public class SysLogController {

    @Resource
    private SysLogService sysLogService;

    @Operation(summary = "分页查询")
    @GetMapping("page")
    public R<Page<SysLog>> page(SysLogSearch search) {
        return R.data(() -> sysLogService.page(search));
    }
}
